
#include<cstdio>
#include <vector>
#include<unistd.h>
#include "Mythread.hpp"

void Print()
{
    while(true)
    {
        printf("我是一个线程封装呀！！\n");
        sleep(1);
    }
}

int main()
{
    std::vector<Thread> threads;
    for(int i=0;i<10;i++)
    {
        threads.push_back(Thread(Print));
    }

    for(auto &td:threads)
    {
        td.Run();
    }

    for(auto&td:threads)
    {
        td.Join();
    }

        return 0;
}
